<template>
  <div class="menu-title">
    <div class="title-content">
      <i class="fas fa-bars"></i>
      <h2>{{ title }}</h2>
    </div>
    <div class="action-icon">
      <i :class="icon"></i>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MenuTitle',
  props: {
    title: {
      type: String,
      required: true
    },
    icon: {
      type: String,
      default: 'fas fa-ellipsis-h'
    }
  }
}
</script>

<style scoped>
.menu-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.title-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-content i {
  font-size: 20px;
  color: #9176db;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.action-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  cursor: pointer;
  transition: all 0.3s;
}

.action-icon:hover {
  background: #eaeaea;
  transform: rotate(90deg);
}

.action-icon i {
  color: #666;
  font-size: 16px;
}
</style>